#include <iostream>
using namespace std;

int f[200020];
int main() {
    int n;
    cin >> n;
    f[1] = 4;
    f[2] = 12;
    for (int i = 3; i <= n; i++) {
        f[i] = 2 * f[i - 1] + 2 * f[i - 2];
        f[i] %= 1000000007;
    }
    cout << f[n];
}